package com.dc.project.entity.map;

import com.dc.project.entity.po.TaskDetailItem;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * TaskDetailItemMapVo
 *
 * @author chenxueli
 * @date 2025-03-10 10:55:12
 */
@Schema(title = "任务详情分析内容" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class TaskDetailItemMapVo extends BaseMap<TaskDetailItem> implements Serializable {

    @Schema(title = "任务id")
    private Long taskId;

    @Schema(title = "任务详情id")
    private Long detailId;

    @Schema(title = "待提交文件的标题")
    private String title;

    @Schema(title = "待提交文件的描述")
    private String description;

    @Schema(title = "文件生成状态 1=正常 2=等待中 3=生成中 4=生成失败")
    private Integer generateStatus;

    @Schema(title = "任务类型 1=根据自定义文件创建 2=根据模板生成")
    private Integer type;

    @Schema(title = "模板key")
    private String templateKey;

    @Schema(title = "来源id")
    private Long sourceId;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public TaskDetailItemMapVo(@NonNull TaskDetailItem entity) {
        super(entity);
        this.taskId = entity.getFkTaskId();
        this.detailId = entity.getFkDetailId();
        this.title = entity.getTitle();
        this.description = entity.getDescription();
        this.generateStatus = entity.getGenerateStatus();
        this.type = entity.getType();
        this.templateKey = entity.getTemplateKey();
        this.sourceId = entity.getFkSourceId();
    }

}
